@extends('default.layouts.adminPublic')
@section('title', '快速创建简历')
@section('headcss')
    @parent
    <link rel="stylesheet" href="{{asset('/default/css/personal/resumeBasic.css')}}">
    <link rel="stylesheet" type="text/css" href="{{asset('/default/css/personal/place.css')}}">
    <link rel="stylesheet" href="{{asset('/default/css/admin/quickResume.css')}}">

    @endsection
    {{--右边主体内容部分--}}
    @section('content')
            <!--导航开始-->
    <div class="crumb_warp">
        <i class="fa fa-home"></i> <a href="{{url('admin/audit_resume')}}">首页</a> &raquo; 简历管理
    </div>

    <div class="right quickResume" style=" margin:0 auto ; width:100%;">
        <div class="rightMain">
            {{--简历错误信息--}}
            @if(count($errors)>0)
                <div class="errors">
                    <ul>
                        @if(is_object($errors))
                            @foreach($errors->all() as $error)
                                <li><span>{{$error}}</span></li>
                            @endforeach
                        @else
                            <li><span>{{$error}}</span></li>
                        @endif
                    </ul>
                </div>
            @endif

            <div class="basicInformation"><h2>快速创建简历</h2></div>
            <div class="jobInfo">
                <form action="{{url("admin/store_quick_resume")}}" method="post" name="resumeForm" id="resumeForm">
                    {{csrf_field()}}
                    {{--基本资料--}}
                    <dl>
                        <dt><span class="caption">姓名</span><span class="asterisk">*</span></dt>
                        <dd><input type="text" name="name" id="name" value="{{ old('name') }}"
                                   placeholder="请输入姓名" tip="请输入姓名"/></dd>
                        <dd class="errinfo"></dd>
                    </dl>
                    <dl>
                        <dt><span class="caption">性别</span><span class="asterisk">*</span></dt>
                        <dd>
                            <span>
                                <input type="radio" name="sex" id="sex1" class="radios" checked value="1"/>
                                <label for="sex1">男</label>
                            </span>
                             <span class="mLeftTen">
                                <input type="radio" name="sex" id="sex2" class="radios" value="2"/>
                                <label for="sex2">女</label>
                            </span>
                        </dd>
                        <dd class="errinfo"></dd>
                    </dl>
                    <dl>
                        <dt><span class="caption">出生年月</span><span class="asterisk">*</span></dt>
                        <dd>
                            <div class="showTime" id="showTime">
                                <input name="birthday" id="birthday" type="hidden" value="{{old('birthday')}}">
                            </div>
                        </dd>
                        <dd class="errinfo"></dd>
                    </dl>
                    <dl>
                        <dt><span class="caption">手机号码</span><span class="asterisk">*</span></dt>
                        <dd><input type="text" name="mobile" id="mobile" value="{{old('mobile')}}" style="width: 200px;"
                                   placeholder="请输入手机号码" tip="请输入手机号码"/></dd>
                        <dd class="errinfo"></dd>
                    </dl>

                    <dl>
                        <dt><span class="caption">最高学历</span><span class="asterisk">*</span></dt>
                        <dd>
                            <input id="education" name="education" type="hidden">
                            <div id="education_select" class="select"><span><a></a></span><i></i></div>
                        </dd>
                        <dd class="errinfo"></dd>
                    </dl>


                    <dl>
                        <dt><span class="caption">工作岗位</span><span class="asterisk">*</span></dt>
                        <input name="jobsort1" type="hidden" id="jobsort1" value="{{old('jobsort1')}}">
                        <input name="jobsort2" type="hidden" id="jobsort2" value="{{old('jobsort2')}}">
                        <input name="jobsort3" type="hidden" id="jobsort3" value="{{old('jobsort3')}}">
                        <input name="jobsort4" type="hidden" id="jobsort4" value="{{old('jobsort4')}}">
                        <input name="jobsort5" type="hidden" id="jobsort5" value="{{old('jobsort5')}}">
                        <dd>
                            <span class="jList" id="posCateInput">
                                <input type="text" name="jobsort" id="jobsort" value="{{old('jobsort')}}" readonly
                                       style="cursor: text"
                                       placeholder="请选择工作岗位"/>
                                <i></i>
                            </span>
                        </dd>
                        <dd class="errinfo"></dd>
                    </dl>
                    <dl>
                        <dt><span class="caption">工作地区</span><span class="asterisk">*</span></dt>
                        <input name="jobarea1" type="hidden" id="jobarea1" value="{{old('jobarea1')}}">
                        <input name="jobarea2" type="hidden" id="jobarea2" value="{{old('jobarea2')}}">
                        <input name="jobarea3" type="hidden" id="jobarea3" value="{{old('jobarea3')}}">
                        <input name="jobarea4" type="hidden" id="jobarea4" value="{{old('jobarea4')}}">
                        <input name="jobarea5" type="hidden" id="jobarea5" value="{{old('jobarea5')}}">
                        <dd>
                            <span class="jList" id="workplaceInput">
                                <input type="text" name="workplace" id="workplace" value="{{old('workplace')}}" readonly
                                       style="cursor: text"
                                       placeholder="请选择工作地区"/>
                                <i></i>
                            </span>
                        </dd>
                        <dd class="errinfo"></dd>
                    </dl>
                    <dl>
                        <dt><span class="caption">寻求职位</span><span class="asterisk">*</span></dt>
                        <dd><input type="text" name="intentionjobs" id="intentionjobs" tip="请输入意向工作岗位"
                                   value="{{ old('intentionjobs') }}" placeholder="请输入意向工作岗位"/></dd>
                        <dd class="errinfo"></dd>
                    </dl>
                    <dl style=" height: 72px;">
                        <dt style=" height: 72px;"><span class="caption">自我评价</span></dt>
                        <dd style=" height: 72px;"><textarea name="introduction" id="introduction"
                                                             placeholder="请输入介绍或技能介绍">{{old('introduction')}}</textarea></dd>
                    </dl>

                    <dl style="margin-top:25px;">
                        <dt></dt>
                        <dd><input name="sub" class="subs btn" type="submit" value="保 存"></dd>
                    </dl>
                </form>
            </div>
        </div>
        <div class="stopper"></div>
    </div>
@endsection
{{--JS部分--}}
@section('footerjs')
    @parent
    <script type="text/javascript" src="{{Resources::jsOption('my_resume')}}"></script>

    <script type="text/javascript" src="{{asset('/default/js/jquery/jquery.select.js')}}"></script>
    <script type="text/javascript" src="{{asset('/default/js/jquery/jquery.validate.extend.js')}}"></script>
    <!--弹出层显示时间加载插件-->
    <script type="text/javascript" src="{{asset('/default/js/jquery/jquery.autoTime.js')}}"></script>
    {{--工作岗位--}}
    <script type="text/javascript" src="{{asset('/default/js/jquery/jquery.position.js')}}"></script>
    {{--工作地区--}}
    <script type="text/javascript" src="{{asset('/default/js/jquery/jquery.area.js')}}"></script>
    {{--简历基本资料验证--}}
    <script type="text/javascript" src="{{asset('/default/js/admin/quick_resume.js')}}"></script>

    <script>
        $('#resume').addClass('on').find('i').css('background-position', '-26px 0px');
        var _token = '{{csrf_token()}}';
        $(function(){
            var closeImg = "{{asset('/default/images/logo.png')}}";
            //基于包装集autoTime函数插件
            $("#showTime").autoTime({
                year: "year",                               //弹出层年份
                month: "month",                             //弹出层月份
                established: '#birthday'                 //成立年份id
            });
            //最高学历
            var selectEducation = $("#education").select({
                defaults: null,//默认按索引选中null为不选
                defaultFill: [{"value": '', "text": "请选择"}],//当defaults为null时,填空使用这个
                optionData: option_education,
                selected: '{{old('education')}}'
            });
            var resumeFrom = $('.rightMain').find("#resumeForm");
            resumeFrom.find("#workplaceInput").click(function(){
                workplaceInput('', 'type');
            });
            resumeFrom.find("#posCateInput").click(function(){
                posCateInput('');
            });
        });
    </script>
@endsection
